package org.joe.chinachess.utils;

import java.awt.*;

public class Constants {

    public final static String name = "象棋-暗棋";// 程序名称

    public final static String version = "1.0.1";// 版本信息

    public final static String author = "Wen Dong";// 作者信息

    public final static String help = "帮助";// 帮助信息

    public final static int WINDOW_HEIGHT = 400;// 窗口高度

    // public final static int WINDOW_WIDTH = WINDOW_HEIGHT * 4 / 5;// 窗口宽度

    public final static int WINDOW_WIDTH = 600;

    public final static int LOCATION_X = (int) ((Toolkit.getDefaultToolkit()
            .getScreenSize().getWidth() - WINDOW_WIDTH) / 2);// 在屏幕上的位置

    public final static int LOCATION_Y = (int) ((Toolkit.getDefaultToolkit()
            .getScreenSize().getHeight() - WINDOW_HEIGHT) / 2);

    public final static int ROW_COUNT = 5;// 棋盘的横线条数

    public final static int COLUMN_COUNT = 9;// 棋盘竖线条数

    public final static int LINE_SPACE = 54;// 线的间距

    public final static int CHAT_PANEL_WIDTH = 300;// 聊天窗口的宽度
    public final static int CHAT_PANEL_HEIGHT = (ROW_COUNT - 1) * LINE_SPACE;// 聊天面板的高度

    public final static int LINE_START_X = (WINDOW_WIDTH - (COLUMN_COUNT - 1)
            * LINE_SPACE) / 2;// 画线的x点

    public final static int LINE_START_Y = (WINDOW_HEIGHT - (ROW_COUNT)
            * LINE_SPACE) / 2;// 画线的y点

    public final static int CHAT_LINE_START_X = LINE_START_X + LINE_SPACE
            + (COLUMN_COUNT - 1) * LINE_SPACE;

    public final static int CHAT_LINE_START_Y = LINE_START_Y;

    public final static int ERROR_CODE=-1000;

    public static class Color {
        /**
         * 红色
         */
        public final static int RED = 'R';
        /**
         * 黑色
         */
        public final static int BLACK = 'B';

        /**
         * 空白占位图
         */
        public final static int STUB = 'K';
    }

    public static class Status {

        /**
         * 未知
         */
        public final static int UNKNOW = 0;

        /**
         * 未选中
         */
        public final static int UNSELECT = 1;

        /**
         * 选中
         */
        public final static int SELECT = 2;

        /**
         * 阵亡
         */
        public final static int DEAD = 3;
    }

    public static class ChessPiece {

        public final static int J = 7;// 将（帅）
        public final static int S = 6;// 士
        public final static int X = 5;// 相
        public final static int M = 4;// 马
        public final static int C = 3;// 车
        public final static int P = 2;// 炮
        public final static int Z = 1;// 卒
        public final static int BLANK = 0;// 空白

    }
}
